Skip to content

programmemory.cpp: avoid unnecessary infer() calls in Executor::executeimpl()#6629

Merged
chrchr-github merged 1 commit intocppcheck-opensource:mainfrom
firewave:pm-cond-xx
Jul 22, 2024
Merged

programmemory.cpp: avoid unnecessary infer() calls in Executor::executeimpl()#6629
chrchr-github merged 1 commit intocppcheck-opensource:mainfrom
firewave:pm-cond-xx

Conversation

@firewave
Copy link
Copy Markdown
Collaborator

@firewave firewave commented Jul 22, 2024

infer() will exit early if any of the list of given values is empty. so there is no need to call it (and copy the values with the call) if we know that beforehand.

@firewave
Copy link
Copy Markdown
Collaborator Author

-D __GNUC__ --check-level=exhaustive lib/utils.cpp

Clang 18 988,629,038 -> 969,342,531
GCC 14 1,026,814,593 -> 1,006,406,604

@chrchr-github chrchr-github merged commit fe1459d into cppcheck-opensource:main Jul 22, 2024
@firewave firewave deleted the pm-cond-xx branch July 22, 2024 13:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants